<template>
  <div class="halfFoot">
    <div class="action-item" @click="handleCancel">
      <slot name="cancel">取消</slot>
    </div>

    <div class="action-item confirm" @click="handleConfirm">
      <slot name="confirm">确定</slot>
    </div>
  </div>
</template>

<script setup lang="ts">
const emits = defineEmits(["cancel", "confirm"]);
const handleCancel = () => {
  emits("cancel");
};
const handleConfirm = () => {
  emits("confirm");
};
</script>

<style lang="scss" scoped>
.halfFoot {
  position: relative;
  display: flex;
  justify-content: center;
  position: fixed;
  bottom: 0;
  z-index: 2000;
  height: 112px;
  background: #ffffff;
  padding: 10px 0 10px 0;
  width: -webkit-fill-available;
  .action-item {
    width: 305px;
    height: 90px;
    border-radius: 45px;
    border: 1px solid #40ae36;
    font-weight: 500;
    color: #40ae36;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .confirm {
    margin-left: 20px;
    background: linear-gradient(90deg, #3ebd33 0%, #9fdf4f 100%);
    color: #ffffff;
    border: none;
  }
}
</style>
